package com.example.administrator.appstpremvpdemo.view.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.example.administrator.appstpremvpdemo.R;
import com.example.administrator.appstpremvpdemo.view.activity.Activity5;
import com.example.administrator.appstpremvpdemo.view.activity.MainActivity;

/**
 * Created by Administrator on 2017/12/7.
 */
public class Userfragent extends BaseFragment implements View.OnClickListener {

    private TextView mTV;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View contentview = inflater.inflate(R.layout.fragent4, container, false);
        initThisView(contentview);
        return contentview;
    }

    private void initThisView(View contentview) {
        mTV = ((TextView) contentview.findViewById(R.id.tv));
        mTV.setOnClickListener(this);
    }


    @Override
    public void onClick(View v) {
        switch (v.getId()) {
        case R.id.tv:
            MainActivity.goTo(getActivity(), Activity5.class, false);
            break;
        }
    }
}
